package collections.predecessor;

import java.util.Hashtable;

/**
 * @Classname HashtableDemo
 * @Description 线程安全的Hashmap
 * @Date 2025/1/8 23:23
 * @Author zhuzhenguo
 */
public class HashtableDemo {

    public static void main(String[] args) {
        // 在方法上都加上synchronized的
        Hashtable<String, String> hashtable = new Hashtable<>();
        hashtable.put("学完以后跳槽涨薪幅度", "80%");
        System.out.println(hashtable.get("学完以后跳槽涨薪幅度"));
    }

}
